package com.lhkj.ct.meta.modules.psychology.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lhkj.ct.base.model.dto.PageQuery;
import com.lhkj.ct.meta.modules.psychology.model.entity.TblScaleReport;
import com.lhkj.ct.meta.modules.psychology.model.vo.EvaluationHistoryVo;
import com.lhkj.ct.meta.modules.psychology.model.vo.PersonalReportInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 测验报告 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2023-10-16
 */
public interface ScaleReportMapper extends BaseMapper<TblScaleReport> {

    /**
     * 测验报告分页
     */
    IPage<TblScaleReport> selectReportPage(Page<TblScaleReport> page,@Param("report") TblScaleReport report,@Param("query") PageQuery pageQuery);

    /**
     * 患者测验报告
     */
    IPage<TblScaleReport> selectReportPageByPatient(Page<TblScaleReport> page,@Param("report") TblScaleReport report,@Param("query") PageQuery pageQuery);

    /**
     * 查询用户测评历史
     */
    List<EvaluationHistoryVo> selectHistoriesByUser(@Param("patId") String patId);
    /**
     * 查看报告详情信息
     */
    PersonalReportInfo getReportInfo(@Param("reportId") String reportId);

    /**
     * 查看报告包含量表名称
     * @param reportId
     * @return
     */
    TblScaleReport getReportWithScaleName(@Param("reportId") String reportId);

}
